package be.kuleuven.mume;

import twitter4j.Twitter;
import twitter4j.TwitterFactory;
import twitter4j.auth.AccessToken;

public class TwitterConst {
	//Consumer is MobiLEnvi Server
	public static final String ConsumerKey = "Yd2favrciVjPyopVrp4DgA";
	public static final String ConsumerSecret = "m4q64sCpJ2PPDErYymDs0fzYC3VAxo3GoUxhwnmpY";
	
	//Acces token of my twitter account
	public static AccessToken getAccessToken(){
		return new AccessToken("386590907-yZM84pn1GFOkh9jGpVfi3GyKNLoK8qxmoYTyyeiQ","kk8ThCG5nG1QsPWXlphxthN0KT1R2LxjaUPxzTnclvU");
	}
	
	/**
	 * Creates a Twitter instance with the Consumer already set.
	 * TODO add dynamicaly the Access Token or provide error if no acces token is found.
	 * @return
	 */
	public static Twitter getTwitter() {
		Twitter twitter = new TwitterFactory().getInstance();
		twitter.setOAuthConsumer(TwitterConst.ConsumerKey,
				TwitterConst.ConsumerSecret);
		return twitter;
	}
}
